package com.haohuo.filter;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: pk.zhang
 * @Date: 2021/3/8 13:42
 */
@Configuration
public class FillterRegister {

    @Bean
    public FilterRegistrationBean ServletLoginFilterFilterRegistration() {
        FilterRegistrationBean registration = new FilterRegistrationBean(new TraceFilter());
        registration.addUrlPatterns("/*"); //
        //registration.addInitParameter("paramName", "paramValue"); //
        registration.setName("TraceFilter");
        registration.setOrder(1);
        return registration;
    }
}
